import 'package:flutter/material.dart';
import 'demo/home.dart';
import 'demo/listview_demo.dart';
import 'demo/buttom_navigation.dart';
import 'demo/sliver_demo.dart';
import 'demo/navigator_demo.dart';
import 'demo/form_demo.dart';
import 'demo/material_components.dart';
import 'demo/input/input_main_demo.dart';
import 'demo/dialog/dialog_demo.dart';
import 'demo/mdc/mdc_main_demo.dart';

void main() => runApp(App());

class App extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
//      home: ListViewDemo(),
//      home: ButtomNavigacitionWidge(),
//      home: SliverDemo(),
      //采用路由形势跳转
      initialRoute: '/',
      routes: {
        '/': (context) => ButtomNavigacitionWidge(),
        '/about': (context) => PageDemo(title: 'about'),
        '/form': (context) => FormDemo(),
        '/mdc': (context) => MaterialComponentsDemo(),
        '/input': (context) => InputMainDemo(),
        '/dialog': (context) => DialogDemo(),
        '/mdc': (context) => MdcMainDemo(),
      },
      theme: ThemeData(
        // title的背景
        primarySwatch: Colors.yellow,
        //点击按下tag的背景颜色
        highlightColor: Color.fromRGBO(255, 255, 255, 0.5),
        //水波纹颜色
        splashColor: Colors.white70,
        accentColor: Color.fromRGBO(255, 255, 255, 0.5),
      ),
    );
  }
}
